<?php

namespace app\common\model;

use think\Model;

class UserAddress extends Model
{
    protected $pk = 'id';

    public static function addressEdit($where,$data){
        return self::where($where)->update($data);
    }

    public static  function addressInsert($data){
        return self::insert($data);
    }

    public static function datalist($where,$page,$num){
        return self::where($where)->page($page,$num)->select();
    }

    public static  function listCount($where){
        return self::where($where)->field("id")->count();
    }

    public static function addressInfo($where){
        return self::where($where)->find();
    }

}